package edu.udlap.spring2008.is300.finalexam.framework.mvc.view;

import edu.udlap.spring2008.is300.finalexam.framework.mvc.controller.Controller;
import edu.udlap.spring2008.is300.finalexam.framework.mvc.model.ModelState;
import java.awt.Component;

/**
 *
 * @author Ruslán Ledesma Garza
 */
public abstract class ViewComponent
{   
    // <editor-fold desc="view component operations...">
    
    /**
     * Tells the component to (re)set its state to an initial
     * state. This is useful when some initial information needs to be gathered
     * by the component and that displayed information is not meant to change
     * during the existence of the view (unless it is reset again).
     */
    public abstract void setInitialState(ModelState modelState);
    
    /**
     * Tells the component that the image set has changed.
     */
    public abstract void imageSetChanged(ModelState modelState);
    
    /**
     * Tells the component that the selection has changed. 
     */
    public abstract void selectionChanged(ModelState modelState);

    /**
     * Tells the component that the set of favorite images has changed.
     */
    public abstract void favoritesChanged(ModelState modelState);
    
    /**
     * Tells the component to set its visual state to slider show mode.
     */
    public abstract void slideShowMode();
    
    /**
     * Tells the component to set its visual state to grid mode.
     */
    public abstract void gridMode();
    
    // </editor-fold>
    
    // <editor-fold desc="getter method for actual awt/swing component...">
    public abstract Component getComponent();
    // </editor-fold>
    
    // <editor-fold desc="controller_ (strategy) management...">
    protected Controller controller_;
    
    public void setController(Controller controller)
    {
        controller_ = controller;
    }
    
    public Controller getController()
    {
        return controller_;
    }
    // </editor-fold>
}
